New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pure-conditions

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pure-conditions

Utility methods for simple conditions

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
decreased by-19.49%
Maintainers
2
Weekly downloads
 
Created
Source

pure-conditions

npm build

A set of pure functions.

Table of Contents

Background

The library is a set of functions that can make developement easier by handling the most popular condition statements. Functions are pure, which means that they do not have side effects and have predictible output. The functions are isolated and do not depend on each other which makes it easier for bundlers and compilers to consume them.

Install

npm install pure-conditions

Usage

const { hasDuplicates } = require('pure-conditions')
hasDuplicates(['foo', 'foo']) // true
const { isEmpty } = require('pure-conditions')
isEmpty({ foo: 'bar' }) // false
const { endsWith } = require('pure-conditions')
endsWith('foo bar', 'bar') // true
const { isEmail } = require('pure-conditions')
isEmail('foobar@gmail.com') // true

Maintainers

@emilos

Contributing

Pull requests and issues are always welcome.

License

MIT

Keywords

FAQs

Package last updated on 17 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc